package com.sfd.jdbc;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;


import com.sfd.jdbcutils.JDBCUtils;

public class JDBCClient {
	private static Connection conn;
	private static Statement st;
	private static ResultSet rs;

	public static void main(String[] args) {
		String sql="select * from sfd.employees";
		
		try {
			conn = JDBCUtils.getConnection();
			st = conn.createStatement();
			rs = st.executeQuery(sql);
			while(rs.next()){
				System.out.println(rs.getString(4));
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			JDBCUtils.release(conn, st, rs);
		}
		
	}
}
